from .base import *
from .base import env

DEBUG = True

SHELL_PLUS = 'ipython'  # python manage.py shell 使用ipython
# SHELL_PLUS_PRE_IMPORTS = [
#     ('apps.score_analysis_system_gaozhong.analysis.views.analysisResults', '*'),
# ]

# ----------------------------------------------
# 在控制台打印 sql 语句
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'formatters': {
        'simple': {
            'format': '[%(asctime)s] %(message)s'
        },
    },
    'handlers': {
        'console': {
            'level': 'DEBUG',
            'class': 'logging.StreamHandler',
            'formatter': 'simple'
        },
    },
    'loggers': {
        # 'django': {
        #     'handlers': ['console'],
        #     'level': 'INFO',
        # },
        'django.db': {
            'handlers': ['console'],
            'level': 'DEBUG',
        }
    },
}
# ----------------------------------------------

SECRET_KEY = env(
    "DJANGO_SECRET_KEY"
)

ALLOWED_HOSTS = ['*']
